#ifndef MAINSENCE_H
#define MAINSENCE_H

#include <QWidget>
#include <QTimer>
#include "map.h"
#include"heroplan.h"
#include "bullet.h"
#include"enemyplane.h"
#include"bomb.h"
#include <QSound>
class MainSence : public QWidget
{
    Q_OBJECT

public:
    MainSence(QWidget *parent = nullptr);
    ~MainSence();
    void initScene();

    void playGame();

    void updatePosition();
    void paintEvent(QPaintEvent *event);
    void mouseMoveEvent(QMouseEvent *);

    Map m_map;
    heroplan m_hero;
    QTimer m_Timer;

    void enemyToScene();

    EnemyPlane m_enemys[ENEMY_NUM];
    int m_recorder;

    void collisionDetection();

    Bomb m_bombs[BOMB_NUM];

};
#endif // MAINSENCE_H
